/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package demo05;

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;

/**
 *
 * @author Administrator
 */
public class GetOuputsDemo {
    private static int i;

    public static void main(String[] args) throws Exception {
        InputStream in1 = System.in;
        InputStreamReader in2 = new InputStreamReader(in1);
        BufferedReader in3 = new BufferedReader(in2);
        String items[] = {"衣", "食", "住", "行", "交际", "爱好", "其他"
        };
        float outputs[] = new float[7];
        float sum = 0;
        for (int i = 0; i < 7; i++) {
            System.out.println("请输入---" + items[i] + "----这项开支的数量:");
        }
        outputs[i] = Float.parseFloat(in3.readLine());
        sum = sum + outputs[i];
        System.out.println("当天各项开支如下：");
        for (int i = 0; i < 7; i++) {
            System.out.println(items[i] + ":" + "outputs[i]");
        }
        System.out.println("当天各项开支总和:" + sum);
    }
}
                                                 